package com.kmgames.ballsengine.physics;

import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.BodyDef;
import com.badlogic.gdx.physics.box2d.BodyDef.BodyType;
import com.badlogic.gdx.physics.box2d.Fixture;
import com.badlogic.gdx.physics.box2d.Shape;
import com.badlogic.gdx.physics.box2d.World;

public class ObjectFactory {
	protected World world;

	public ObjectFactory(World world) {
		this.world = world;
	}

	protected Fixture createFixture(BodyType bodyType, Shape shape) {
		BodyDef def = new BodyDef();
		def.type = bodyType;

		Body body = world.createBody(def);
		Fixture fixture = body.createFixture(shape, 1);

		return fixture;
	}
}